/*
 * Ant Group
 * Copyright (c) 2004-2024 All Rights Reserved.
 */
package com.alipay.zmdepositdemo.service.trade;

import com.alipay.api.response.AlipayDataDataserviceBillDownloadurlQueryResponse;
import com.alipay.api.response.AlipayTradeFastpayRefundQueryResponse;
import com.alipay.api.response.AlipayTradePayResponse;
import com.alipay.api.response.AlipayTradeQueryResponse;
import com.alipay.zmdepositdemo.model.OpenResponse;
import com.alipay.zmdepositdemo.model.TradeDeductModel;
import com.alipay.zmdepositdemo.model.TradeRefundModel;

import java.util.List;

/**
 * @author zhangjian
 * @version DepositOrderTradeService.java, v 0.1 2024年06月18日 10:40 zhangjian
 */
public interface TradeOrderService {

    /**
     * 发起扣款
     *
     * @param model 请求参数
     * @return 返回结果
     */
    OpenResponse<AlipayTradePayResponse> tradePay(TradeDeductModel model);

    /**
     * 查询扣款
     *
     * @return 返回结果
     */
    OpenResponse<AlipayTradeQueryResponse> queryPay(String outTradeNo,
                                                    String tradeNo,
                                                    String orgPid,
                                                    List<String> queryOptions);

    /**
     * 取消扣款
     *
     * @return boolean true 取消扣款成功
     */
    OpenResponse<Boolean> cancelPay(String outTradeNo,
                                    String tradeNo,
                                    String operatorId);

    /**
     * 申请退款
     *
     * @param model 请求参数
     * @return 返回结果
     */
    OpenResponse<Boolean> tradeRefund(TradeRefundModel model);

    /**
     * 查询交易退款
     *
     * @return 返回结果
     */
    OpenResponse<AlipayTradeFastpayRefundQueryResponse> queryRefund(String outRequestNo,
                                                                    String outTradeNo,
                                                                    String tradeNo,
                                                                    List<String> queryOptions);

    /**
     * 查询对账单下载地址
     *
     * @return 返回结果
     */
    OpenResponse<AlipayDataDataserviceBillDownloadurlQueryResponse> queryBillDownloadUrl(String billType,
                                                                                         String billDate,
                                                                                         String smId);

}